package com.ruoyi.user.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.user.mapper.MembersMapper;
import com.ruoyi.user.domain.Members;
import com.ruoyi.user.service.IMembersService;

/**
 * 会员表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-10
 */
@Service
public class MembersServiceImpl implements IMembersService 
{
    @Autowired
    private MembersMapper membersMapper;

    /**
     * 查询会员表
     * 
     * @param id 会员表主键
     * @return 会员表
     */
    @Override
    public Members selectMembersById(Integer id)
    {
        return membersMapper.selectMembersById(id);
    }

    /**
     * 查询会员表列表
     * 
     * @param members 会员表
     * @return 会员表
     */
    @Override
    public List<Members> selectMembersList(Members members)
    {
        return membersMapper.selectMembersList(members);
    }

    /**
     * 新增会员表
     * 
     * @param members 会员表
     * @return 结果
     */
    @Override
    public int insertMembers(Members members)
    {
        members.setCreateTime(DateUtils.getNowDate());
        return membersMapper.insertMembers(members);
    }

    /**
     * 修改会员表
     * 
     * @param members 会员表
     * @return 结果
     */
    @Override
    public int updateMembers(Members members)
    {
        return membersMapper.updateMembers(members);
    }

    /**
     * 批量删除会员表
     * 
     * @param ids 需要删除的会员表主键
     * @return 结果
     */
    @Override
    public int deleteMembersByIds(Integer[] ids)
    {
        return membersMapper.deleteMembersByIds(ids);
    }

    /**
     * 删除会员表信息
     * 
     * @param id 会员表主键
     * @return 结果
     */
    @Override
    public int deleteMembersById(Integer id)
    {
        return membersMapper.deleteMembersById(id);
    }
}
